layui.use(['table'], function () {
    var table = layui.table,
        loc = location.href,
        n1 = loc.length,//地址的总长度
        n2 = loc.indexOf('='),//取得=号的位置
        id = decodeURI(loc.substr(n2 + 1, n1 - n2));

    table.render({
        elem: '#demo',
        url:'/Product/getCourseRecord?id='+id+'&type='+2,
        cols:[[
            {field:'implementDate',title:'审核时间',align:'center'},
            {field:'trueName',title:'发起人',align:'center'},
            {field:'result',title:'审核结果',align:'center',templet:function(data){
                    var result;
                    if(data.result == 1){
                        result = "审核通过";
                    }else if(data.result == 2){
                        result = "待审核";
                    }else{
                        result = "审核驳回";
                    }
                    return "<div>"+result+"</div>";
                }},
            {field:'remarks',title:'反馈详情',align:'center'},
        ]]
    });
});